// 侧边栏目录
module.exports = app => {
  const mongoose = app.mongoose;
  const Schema = mongoose.Schema;

  const BannerSchema = new Schema({
    name: { type: String },
    icon: { type: String },
    // 用来排序
    sort: { type: Number },
    foods: { type: Array },
    createTime: {
      type: Date,
      default: Date.now
    },
    updateTime: {
      type: Date,
      default: Date.now
    }
  });
  return mongoose.model("Banner", BannerSchema);
};
